package myStruts.com.damon.action;

import java.util.Map;
import java.util.Set;

import javax.servlet.http.HttpServletRequest;

import myStruts.com.damon.action.vo.UserVo;
import myStruts.com.damon.bean.DamonBeans;

public class UserAction implements Action{

	@Override
	public String execute(HttpServletRequest request, DamonBeans damonbean, Map<String, String> actionforwod) {
		String url ="index.html";
		UserVo uservo = (UserVo)damonbean;
		Set<String> set = actionforwod.keySet();
		for(String key:set){
			String name = key;
			if( "success".equals(name)){
				url = actionforwod.get(name);
			}else {
				url = actionforwod.get(name);
			}
		}
		request.setAttribute("uservo",uservo);
		return url;
	}

}
